﻿@model IEnumerable<RedSand.Site.Models.SlideInfo>
<div class="panel" id="slide-list">
    <div class="panel-header">
        <span>Slideshow</span>
        @Ajax.ActionLink("Thêm hình ảnh", "create", null, AdminAjaxOptions.GetForm, new { @class = "btnAddNew ", @style = "width:120px" })</div>
    <table class="table-list">
        <tr>
            <th style="width: 30px">
                Ảnh
            </th>
            <th style="text-align:left; padding-left:15px; width:20%">
                Tiêu đề
            </th>
            <th style="text-align:left; padding-left:20px"> Mô tả</th>
            <th class="Status">
                Trạng thái
            </th>
            <th style="width:50px">
            </th>
        </tr>
        @if (Model != null)
        {
            foreach (var item in Model)
            {
            <tr>
                <td align="center">
                    <img src="@RedSand.Site.GlobalClass.GetImageUrl(item.Image)" alt="" width="150" height="100" />
                </td>
                <td style="text-align:left; padding-left:15px">
                    @item.Title
                </td>
                <td style="text-align:left; padding-left:15px">
                    @item.Description
                </td>
                <td align="center">
                    <span class="slide-list-status">@DropDownListHelper.GetStatusString(item.Status)</span>
                </td>
                <td align="center">
                    @Ajax.ActionLink("sửa", "edit", new { id = item.SlideID }, AdminAjaxOptions.GetForm, new { @class = "btnAction btnEdit", title = "Sửa" })
                    @Ajax.ActionLink("xóa", "delete", new { id = item.SlideID, image = item.Image }, AdminAjaxOptions.DeleteRecord, new { @class = "btnAction btnDelete", title = "Xóa" })
                </td>
            </tr>
            }
        }
    </table>
    <div class="dialog-footer">
    </div>
</div>
